Conversation
Co-authored-by: rwvo <21990117+rwvo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix option validation for command line arguments in Omniprobe
Validate --cache-location and --log-location options early with actionable warnings
Mar 16, 2026
Consolidate the duplicated env var assignment into a single block after all validation/fallback logic completes. The original Copilot code set LOGDUR_LOG_LOCATION in three separate branches; now there are just two: "console" or the validated file path. No behavioral change — same validation, same warnings, same fallbacks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two silent failure modes: a typo in
--cache-location(e.g./.triton/cachevs~/.triton/cache) caused instrumentation to run against a wrong/empty directory with no feedback; a missing parent directory for-l /path/to/output.jsoncaused output to be silently dropped.Changes
is_triton_cache_dir(path)— new helper that returnsTrueonly if the directory contains at least one subdirectory (Triton's per-kernel hash dirs). Empty directories fail the check.--cache-locationvalidation — when the path exists as a directory but passes no subdirectory check, emit:--log-locationparent-dir validation — when the parent directory is missing, attemptos.makedirs()(mirroring existing--cache-locationbehavior); fall back to console with a clear error onOSError. Also fixes the misleading"either doesn't exist or it is a directory"warning — that branch is only reachable when the path is a directory.Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.